<script setup lang="ts">
import { computed } from 'vue';

const props: any = defineProps<{
    ujt: any;
    id?: any;
    full?: number;
    popstyle?: any;
    maskstyle?: any;
}>();
const { $global } = props.ujt;
// 初始化pop数据
if (!props.id) {
    props.id = 'popdefaultboxconfirm';
}
if (!$global.pop[props.id]) {
    $global.pop[props.id] = {};
}
if ($global.pop[props.id]?.notit == undefined) {
    $global.pop[props.id].notit = 1;
}
if (!$global.pop[props.id]?.btns) {
    $global.pop[props.id].btns = [
        {
            nm: computed(() => $global.lang?.asai?.confirm || 'Confirm'),
            fn: () => {
                $global.pop[props.id].fn && $global.pop[props.id].fn();
                $global.pop[props.id].stat = 0;
            },
        },
        {
            nm: computed(() => $global.lang?.asai?.cancel || 'Cancel'),
            fn: () => {
                $global.pop[props.id].stat = 0;
            },
        },
    ];
}
</script>

<template>
    <PopBox
        :ujt="ujt"
        :id="id"
        :full="full"
        :popstyle="popstyle"
        :maskstyle="maskstyle"
    ></PopBox>
</template>

<style scoped lang="scss"></style>
